home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / MacOS / QuickDraw™ 3D 1.0.6F4 SDK / Samples / SampleCode / 3DMF2PICT / 3DMF2PICTSupport.h < prev    next >
Encoding:
Text File  |  1995-06-08  |  1.9 KB  |  58 lines  |  [TEXT/MPCC]

  1. // Quickdraw 3D sample code
  2. //
  3. // Nick Thompson, AppleLink: DEVSUPPORT (devsupport@applelink.apple.com)
  4. //
  5. // ©1994-5 Apple Computer Inc., All Rights Reserved
  6.  
  7.  
  8. #ifndef _MY3DSUPPORT_H_
  9. #define _MY3DSUPPORT_H_
  10.  
  11. // Macintosh System Stuff
  12. #include <Types.h>
  13. #include <Windows.h>
  14.  
  15. // QuickDraw 3D stuff
  16. #include "QD3D.h"
  17. #include "QD3DErrors.h"
  18. #include "QD3DView.h"
  19.  
  20. //-------------------------------------------------------------------------------------------
  21.  
  22. struct _documentRecord {
  23.     GWorldPtr        fGWorld ;                // the offscreen used as the basis for this apps
  24.                                             // pixmap draw context
  25.     TQ3ViewObject    fView ;                    // the view for the scene
  26.     TQ3GroupObject    fModel ;                // object in the scene being modelled
  27.     TQ3StyleObject    fInterpolation ;        // interpolation style used when rendering
  28.     TQ3StyleObject    fBackFacing ;            // whether to draw shapes that face away from the camera
  29.     TQ3StyleObject    fFillStyle ;            // whether drawn as solid filled object or decomposed to components
  30.     TQ3Point3D        fGroupCenter ;            // the center point of the main group
  31.     float            fGroupScale ;            // how much to scale for the camera
  32.     TQ3Matrix4x4    fRotation;                // the transform for the model
  33. };
  34.  
  35. typedef struct _documentRecord DocumentRec, *DocumentPtr, **DocumentHdl ;
  36.  
  37. //---------------------------------------------------------------------------------------
  38.  
  39. OSErr MyQD3DInitialize( void ) ;
  40. OSErr MyQD3DExit() ;
  41.  
  42. TQ3ViewObject        MyNewView(GWorldPtr theGWorld) ;
  43. TQ3DrawContextObject MyNewDrawContext(GWorldPtr theGWorld) ;
  44. TQ3CameraObject        MyNewCamera(CGrafPtr thePort) ;
  45. TQ3GroupObject        MyNewLights(void) ;
  46. TQ3GroupObject        MyNewModelFromFile(FSSpec *theFileSpec) ;
  47. TQ3Status             SubmitScene( DocumentPtr theDocument ) ;
  48.  
  49. TQ3Point3D AdjustCamera(
  50.     DocumentPtr            theDocument,
  51.     short                winWidth,
  52.     short                winHeight) ;
  53.     
  54. Boolean             MetafileFileSpecify( FSSpec *theFile ) ; 
  55. TQ3Status             MyReadModelFromFile( TQ3FileObject theFile,TQ3GroupObject myGroup) ;
  56.  
  57. #endif
  58.